﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace WEB.Core.Util
{
    public class Message
    {
        private static Hashtable messages = null;
        public Message()
        {
            

        }
        private static void Init()
        {
            if (null == messages)
            {
                messages = new Hashtable();
                messages.Add(2601, "Existing data, please check the data");
                messages.Add(2627, "Existing data, please check the data");
                messages.Add(547, "Can not be deleted, this data has been used");
            }
        }
        public static string Get(object key)
        {
            Init();
            string value = (string)messages[key];
            if (!string.IsNullOrEmpty(value))                
                return value;
            else
                return key.ToString();
            
        }
    }
}
